package com.company.beauty.common.config;

import com.company.beauty.common.config.properties.CacheProperties;
import com.company.beauty.common.config.properties.RetryProperties;
import com.company.beauty.common.retry.RetryJobBootstrapStartupRunner;
import com.company.beauty.common.retry.RetryRequestRedisHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * <p>retry request configuration</p >
 *
 * @author youyoukele
 * @version 1.0
 * @date 2024/4/17 11:07
 */
@Slf4j
@Configuration
@Import(RetryProperties.class)
public class RetryRequestConfiguration {

    @Bean
    public RetryRequestRedisHandler retryRequestRedisHandler() {
        log.info("common retry request redis handler ==========>");
        return new RetryRequestRedisHandler();
    }

    @Bean
    public RetryJobBootstrapStartupRunner retryJobBootstrapStartupRunner() {
        log.info("common retry job bootstrap startup runner ==========>");
        return new RetryJobBootstrapStartupRunner();
    }

}
